/**
 * 
 */
package ac.notification.manager;

import ac.notification.event.INotificationListener;
import ac.notification.event.NotificationEvent;

/**
 * @author Ankush Chaudhary
 *
 */
public class NotificationRegistrar 
{
	private static INotificationManager notificationManager = new DefaultNotificationManager();
	public static void registerListener(INotificationListener notificationListener)
	{
		notificationManager.registerListener(notificationListener);
	}
	
	public static void updateSubscriptions(INotificationListener notificationListener)
	{
		notificationManager.updateSubscriptions(notificationListener);
	}
	
	public static void removeListener(INotificationListener notificationListener)
	{
		notificationManager.removeListener(notificationListener);
	}
	
	public static void dispatchNotification(NotificationEvent notificationEvent)
	{
		notificationManager.dispatchNotification(notificationEvent);
	}

	/**
	 * @return the notificationManager
	 */
	public static INotificationManager getNotificationManager() {
		return notificationManager;
	}

	/**
	 * @param notificationManager the notificationManager to set
	 */
	public static void setNotificationManager(
			INotificationManager notificationManager) {
		NotificationRegistrar.notificationManager = notificationManager;
	}
	
	public static void setLogging(boolean logging)
	{
		notificationManager.setLogging(logging);
	}
	
	public static void haultEventSystem()
	{
		notificationManager.haultEventDispatch();
	}

}
